Sort strings of ints and save original index